<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="admin/_fragments::head(~{::title})">
    <title>标签</title>
</head>

<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="../../static/js/semantic.min.js" th:src="@{/js/semantic.min.js}"></script>

<body>
    <!--导航 -->
    <nav  th:replace="admin/_fragments::menu(3)" class="ui inverted attached segment mine-padded-tb-mini">
    </nav>
    <div class="ui attached pointing menu">
        <div class="ui container">
            <div class="right menu">
                <a href="#" class="item">发布</a>
                <a href="#" class="teal active item">列表</a>
            </div>
        </div>
    </div>
    <!-- 中间内容 -->
    <div class="mine-container mine-padded-tb-large">
        <div class="ui container">
            <table class="ui celled table">
                <thead>
                    <tr>
                        <th>编号</th>
                        <th>名称</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr th:each="tag : ${page.content}">
                        <!--<td th:text="${iterStat.count}">1</td>-->
                        <td th:text="${tag.id}"></td>
                        <td th:text="${tag.name}"></td>
                        <td>
                            <a href="#" th:href="@{/admin/tags/input/{id}(id=${tag.id})}" class="ui mini basic teal button">编辑</a>
                            <a href="#" th:href="@{/admin/tags/delete/{id}(id=${tag.id})}" class="ui mini basic red button">删除</a>
                        </td>
                    </tr>
                </tbody>
                <tfoot>
                    <tr>
                        <th colspan="6">
                            <div class="ui pagination menu mini">
                                <a th:href="@{/admin/tags(number=${page.number}-1)}" class="item" th:classappend="!${page.pre} ? mine-href-hide">上一页</a>
                                <a th:href="@{/admin/tags(number=${page.number}+1)}" class="item" th:classappend="!${page.next} ? mine-href-hide">下一页</a>
                            </div>
                            <a href="#" th:href="@{/admin/tags/input/null}" class="ui mini right floated teal basic button">新增</a>
                        </th>
                    </tr>
                </tfoot>
            </table>
        </div>
    </div>
    <!-- 底部 -->
    <footer th:replace="admin/_fragments::footer" class="ui inverted vertical segment mine-padded-tb-massive">
    </footer>
    <script>
        $('.ui.dropdown').dropdown({
            on : 'hover'
        });
    </script>
</body>
</html>